- @no_container = true
- @can_bulk_update = can?(current_user, :admin_merge_request, @project)

- page_title "Merge Requests"
- unless @project.default_issues_tracker?
  = content_for :sub_nav do
    = render "projects/merge_requests/head"

- content_for :page_specific_javascripts do
  = webpack_bundle_tag 'common_vue'
  = webpack_bundle_tag 'filtered_search'


= render 'projects/last_push'

- if @project.merge_requests.exists?
  %div{ class: container_class }
    .top-area
      = render 'shared/issuable/nav', type: :merge_requests
      .nav-controls
        - if @can_bulk_update
          = button_tag "Edit Merge Requests", class: "btn js-bulk-update-toggle"
        - merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project))
        - if merge_project
          = link_to new_namespace_project_merge_request_path(merge_project.namespace, merge_project), class: "btn btn-new", title: "New merge request" do
            New merge request

    = render 'shared/issuable/search_bar', type: :merge_requests

    - if @can_bulk_update
      = render 'shared/issuable/bulk_update_sidebar', type: :merge_requests

    .merge-requests-holder
      = render 'merge_requests'
- else
  = render 'shared/empty_states/merge_requests', button_path: new_namespace_project_merge_request_path(@project.namespace, @project)
